package com.aisino.efence.model;

import com.aisino.efence.enums.ResultEnum;

/**
 * @author fzc
 * @package com.aisino.efence.model
 * 返回结果实体类
 * @create 2018-04-04 11:19
 **/
public class ajaxResult {
    /**
     * 状态码
     */
    private int code;
    /**
     * 返回说明
     */
    private String message;
    /**
     * 数据
     */
    private Object data;


    public ajaxResult() {
    }

    public ajaxResult(ResultEnum resultEnum) {
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMessage();
    }

    public ajaxResult(ResultEnum resultEnum, Object data) {
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMessage();
        this.data = data;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
